package com.example.demo;

import com.example.demo.api.ApiGetFunc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(1)
public class Init implements ApplicationRunner {

    @Autowired
    private ApiGetFunc apiGetFunc;

    @Override
    public void run(ApplicationArguments args) throws Exception {
//        new Thread(() -> {
//            // 全国行政区信息
//            this.apiGetFunc.writeProvinceInfo();
//            // 省市区各个行政区坐标
//            this.apiGetFunc.writeProvinceArea();
//            this.apiGetFunc.writeCityArea();
//            this.apiGetFunc.writeDistrictArea();
//        }).start();
    }

}
